<?php
require_once 'Bitly.php';

$login = 'login';
$api_key = 'apikey';

$login = 'cegomez';
$api_key = 'R_18e63045e4f5732248e8071f8c9a03ba';

$bl = new Bitly($login, $api_key);

$bl->shorten("http://www.backgrndr.com/?url=http://www.flickr.com/photos/cyberdespacio/4492434789/");

$is_new = $bl->isNewHash();

echo 'Shorten url: ' . $bl->getBitly_url() . "<br />\n";

$bl->expand('http://bit.ly/asdfg');

echo 'Exanded url: ' . $bl->getLong_url() . "<br />\n";

$bl->clicks('http://bit.ly/asdfg');

echo 'User clicks: ' . $bl->getUser_clicks() . "<br />\n";
echo 'Global clicks: ' . $bl->getGlobal_clicks();
